package com.example.day45;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;

import com.example.day45.animator.AnimatorActivity_;
import com.example.day45.eventbus.EventBusActivity_;
import com.example.day45.sensor.SensorActivity_;
import com.example.day45.surface.SurfaceActivity;

import org.androidannotations.annotations.Click;
import org.androidannotations.annotations.EActivity;
import org.androidannotations.annotations.ViewById;

@EActivity(R.layout.activity_main1)
public class MainActivity extends AppCompatActivity {
    @ViewById
    Button animatorBtn;
    @ViewById
    Button surfaceBtn;
    @ViewById
    Button sensorBtn;
    @ViewById
    Button eventbusBtn;
    @ViewById
    Button gitBtn;

    @Click({R.id.eventbus_btn, R.id.sensor_btn, R.id.git_btn, R.id.surface_btn, R.id.animator_btn})
    public void onClick(View v) {
        switch (v.getId()) {
            case R.id.sensor_btn:
                startActivity(new Intent(this, SensorActivity_.class));
                break;
            case R.id.eventbus_btn:
                startActivity(new Intent(this, EventBusActivity_.class));
                break;
            case R.id.surface_btn:
                startActivity(new Intent(this, SurfaceActivity.class));
                break;
            case R.id.animator_btn:
                startActivity(new Intent(this, AnimatorActivity_.class));
                break;

        }

    }
}
